package com;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class Logger {

	public static boolean debug = false;

	public final static DateFormat DATE_TIME_FOAMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	public static String getFormatTime() {
		return DATE_TIME_FOAMAT.format(System.currentTimeMillis());
	}

	public static void info(Object o) {
		System.out.println(getFormatTime() + " [INFO]: " + o);
	}

	public static void debug(Object o) {
		if (debug) {
			System.out.println(getFormatTime() + " [DEBUG]: " + o);
		}
	}

	public static void warn(Object o) {
		System.out.println(getFormatTime() + " [WARN]: " + o);
	}

	public static void error(Object o) {
		System.err.println(getFormatTime() + " [ERROR]: " + o);
	}

	public static void print(Object o) {
		System.out.println(o);
	}

}
